package com.chinasofti.framework.dataaccess;

import java.util.ArrayList;

import com.chinasofti.framework.data.Entity;
import com.chinasofti.framework.net.ResponseDataCategory;

public abstract class LocalDataAccess<T extends Entity> implements IDataAccess<T> {

	@Override
	public void loadAll(ArrayList<T> outEntities) throws Exception {
		outEntities = DataAccessUtils.getSqlLiteData(this);
	}

	@Override
	public void load(Object key, T outEntity) throws Exception {
		outEntity = DataAccessUtils.getSqlLiteData(key, this);
	}

	@Override
	public void load(Filter filter, ArrayList<T> outEntities) throws Exception {
		outEntities = DataAccessUtils.getSqlLiteData(filter, this);
	}


	@Override
	public long loadAll(long from, long to, ArrayList<T> entities,
			ArrayList<ResponseDataCategory> outCategories) throws Exception {
		
		return 0;
	}

	@Override
	public long load(Filter filter, long from, long to,
			ArrayList<T> outEntities,
			ArrayList<ResponseDataCategory> outCategories) throws Exception {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public long load(ArrayList<Parameter> params, long from, long to,
			ArrayList<T> outEntities,
			ArrayList<ResponseDataCategory> categorieslong) throws Exception {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public boolean save(T entity) throws Exception {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean save(ArrayList<T> entities) throws Exception {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean delete(Object key) throws Exception {
		// TODO Auto-generated method stub
		return false;
	}
}
